home *** CD-ROM | disk | FTP | other *** search
- /*
- * CBLibrary - ViewsMenu
- * Copyright (C) 2003 Chris Bazley
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- /* General code to maintain a list of views and build iconbar menu */
-
- #ifndef ViewsMenu_h
- #define ViewsMenu_h
-
- #include <stdbool.h>
- #include "kernel.h"
- #include "toolbox.h"
-
- /*
- - The 'views' menu must be 'shared' and have the template name
- "ViewsMenu".
-
- - The parent menu must deliver Menu_AboutToBeShown and
- Menu_HasBeenHidden events.
-
- - When the parent menu is (auto-)created, its ObjectId and the
- ComponentId of the 'views' submenu must be passed to
- ViewsMenu_parentcreated()
-
- - File paths MUST be canonicalised (OS_FSControl 37) before being
- passed to ViewsMenu, though case may differ.
- */
-
- extern bool ViewsMenu_strcmp_nc(const char *string1, const char *string2);
- extern _kernel_oserror *ViewsMenu_create(void);
- extern _kernel_oserror *ViewsMenu_parentcreated(ObjectId parent_menu, ComponentId parent_entry);
-
- extern _kernel_oserror *ViewsMenu_add(ObjectId showobject, char *view_name, char *file_path);
- extern _kernel_oserror *ViewsMenu_setname(ObjectId showobject, char *view_name, char *file_path);
- extern _kernel_oserror *ViewsMenu_remove(ObjectId showobject);
- extern _kernel_oserror *ViewsMenu_showall(void);
- extern ObjectId ViewsMenu_findview(char *file_path_to_match);
- extern ObjectId ViewMenu_getfirst(void);
- extern ObjectId ViewMenu_getnext(ObjectId current);
- extern _kernel_oserror *ViewsMenu_show_object(unsigned int flags, ObjectId id, int show_type, void *type, ObjectId parent, ComponentId parent_component);
-
- #endif
-